footnotemark footnotetext addtocounter

Source

Let's say we have a text\footnotemark{} which uses multiple \verb|\footnotemark{}|s in the same sentence.\footnotemark{}.
% If we now want to savely define the text for the first footnotemark, we first decrement the counter by one and then
% increment again afterwards.
\addtocounter{footnote}{-1}\addtocounter{Hfootnote}{-1}
\footnotetext{The first footnote.}
% Then we can define the text for the second footnotemark.
\addtocounter{footnote}{1}\addtocounter{Hfootnote}{1}
\footnotetext{The second footnote.}

This avoids hard-coding the footnote number for the \footnotetext{} commands which can lead to issues if the text before the two subsequent \footnotemark{}s adds more footnotes.